<template>
	<view class="content">
		<view >
			<view class="" slot="head">
				订单管理
			</view>
			<view class="" slot="body">
				<u-grid :col="4" :border="false">
					<u-grid-item @click="toPage('allOrders')">
						<image src="/static/index/6.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">全部订单</view>
					</u-grid-item>
					<u-grid-item @click="toPage('process')">
						<image src="/static/index/daibanrenwu.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">全部待办</view>
					</u-grid-item>
					<u-grid-item @click="toPage('myOrders')">
						<image src="/static/index/6.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">我的订单</view>
					</u-grid-item>
					<!-- <u-grid-item @click="toPage('myProcess')">
						<image src="/static/index/daibanrenwu.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">我的待办</view>
					</u-grid-item> -->
					<u-grid-item   @click="toPage('addOrder')">
						<image  src="/static/index/liusuorenyuandengji.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">租赁登记</view>
					</u-grid-item>
				</u-grid>
			</view>
		</view>
		<view margin="0 0 10px 0" >
			<view class="" slot="head">
				客户管理
			</view>
			<view class="" slot="body">
				<u-grid :col="4" :border="false">
					<u-grid-item @click="toPage('addCostum')">
						<image src="/static/index/kehuchaxun.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">添加客户</view>
					</u-grid-item>
					<u-grid-item @click="toPage('customList')">
						<image src="/static/index/jiashiyuanzhuxiaoguanli.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">客户管理</view>
					</u-grid-item>
				</u-grid>
			</view>
		</view>
		<view margin="0 0 10px 0" >
			<view class="" slot="head">
				押金管理
			</view>
			<view class="" slot="body">
				<u-grid :col="4" :border="false">
					<u-grid-item @click="toPage('depositPayList')">
						<image src="/static/index/yajinjilu.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">押金记录</view>
					</u-grid-item>
					<u-grid-item @click="toPage('addDeposti')">
						<image src="/static/index/yajinjianmian.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">申请押金</view>
					</u-grid-item>
					<!-- <u-grid-item @click="toPage('customList')">
						<image src="/static/index/jiashiyuanzhuxiaoguanli.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">退还记录</view>
					</u-grid-item>
					<u-grid-item @click="toPage('customList')">
						<image src="/static/index/jiashiyuanzhuxiaoguanli.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">扣款申请</view>
					</u-grid-item>
					<u-grid-item @click="toPage('customList')">
						<image src="/static/index/jiashiyuanzhuxiaoguanli.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">扣款记录</view>
					</u-grid-item> -->
				</u-grid>
			</view>
		</view>
		<view margin="0 0 10px 0" >
			<view class="" slot="head">
				发票管理
			</view>
			<view class="" slot="body">
				<u-grid :col="4" :border="false">
					<u-grid-item @click="toPage('shenqingfapiao')">
						<image src="/static/index/fapiaoshenqing.png" mode="widthFix" style="width: 46px; height: 46px;border-radius: 20rpx;"></image>
						<view class="grid-text">申请发票</view>
					</u-grid-item>
					<u-grid-item @click="toPage('lijikaipiao')">
						<image src="/static/index/kaipiao.png" mode="widthFix" style="width: 46px; height: 46px;border-radius: 20rpx;"></image>
						<view class="grid-text">立即开票</view>
					</u-grid-item>
					<u-grid-item @click="toPage('fapiaojilu')">
						<image src="/static/index/fapiaojilu.png" mode="widthFix" style="width: 46px; height: 46px;border-radius: 20rpx;"></image>
						<u-badge type="error" :count="dkpsq_count"></u-badge>
						<view class="grid-text">发票记录</view>
					</u-grid-item>
					<!-- <u-grid-item @click="toPage('customList')">
						<image src="/static/index/jiashiyuanzhuxiaoguanli.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">退还记录</view>
					</u-grid-item>
					<u-grid-item @click="toPage('customList')">
						<image src="/static/index/jiashiyuanzhuxiaoguanli.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">扣款申请</view>
					</u-grid-item>
					<u-grid-item @click="toPage('customList')">
						<image src="/static/index/jiashiyuanzhuxiaoguanli.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">扣款记录</view>
					</u-grid-item> -->
				</u-grid>
			</view>
		</view>
		<view margin="0 0 10px 0" v-if="1==2">
			<view class="" slot="head">
				车辆管理
			</view>
			<view class="" slot="body">
				<u-grid :col="4" :border="false">
					<u-grid-item>
						<image src="/static/index/car-query.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">车辆查询</view>
					</u-grid-item>
					<u-grid-item>
						<image src="/static/index/cheliangxinxi.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">添加车辆</view>
					</u-grid-item>
					<u-grid-item>
						<image src="/static/index/icon_3-06.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">车型管理</view>
					</u-grid-item>
					<u-grid-item>
						<image src="/static/index/icon_3-05.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">车辆池</view>
					</u-grid-item>
				</u-grid>
			</view>
		</view>
		<view margin="0 0 10px 0" v-if="1==2">
			<view class="" slot="head">
				订单管理
			</view>
			<view class="" slot="body">
				<u-grid :col="4" :border="false">
					<u-grid-item>
						<image src="/static/index/daibanrenwu.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">待办任务</view>
					</u-grid-item>
					<u-grid-item>
						<image src="/static/index/6.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">我的订单</view>
					</u-grid-item>
					<u-grid-item>
						<image src="/static/index/weizhang.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">违章管理</view>
					</u-grid-item>
					<u-grid-item>
						<image src="/static/index/yajinjianmian.png" mode="widthFix" style="width: 46px; height: 46px;"></image>
						<view class="grid-text">押金管理</view>
					</u-grid-item>
				</u-grid>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dkpsq_count:0,
				title: 'Hello'
			}
		},
		onLoad() {
			
		},
		onShow() {
			console.log("显示index页面");
			this.getIndexPageData();
		},
		mounted() {
			// this.getCurrentEmploye();
		},
		methods: {
			toPage(page){
				uni.navigateTo({
					url:'/pages/'+page+'/'+page
				})
			},
			getCurrentEmploye(){
				this.$http.post('/employe/getCurEmployeInfo',{},(res)=>{
					console.log(res);
				});
			},
			getIndexPageData(){
				var that=this;
				this.$http.post('/kpsq/getIndexPageData',{},(res)=>{
					that.dkpsq_count=res.data.result.dkpsq_count;
				});
			}
		}
	}
</script>

<style>
	.content>view{
		background-color: white;
		margin-top: 19rpx;
		border-top: solid 1px #f4f4f5;
		border-bottom: solid 1px #f4f4f5;
		color: #606266;
		
	}
	.content>view:first-child{
		background-color: white;
		margin-top: 0rpx;
	}
	.content>view>view:first-child{
		padding: 30rpx 30rpx;
		border-bottom: solid 1px #f4f4f5;
	}
	.content>view>view:nth-child(2){
		padding: 53rpx 30rpx;
	}
</style>